import request from '@/utils/request'


// 查询模型列表

export function listModel(query) {
    return request({
      url: '/models/page',
      method: 'get',
      params: query
    })
  }

// 模型上线（发布）

export function publishModel(modeId) {
    return request({
      url: '/models/' + modeId + '/publish',
      method: 'post'
    })
  }
// 模型下线（草稿）
  export function offLineModel(modeId) {
    return request({
      url: '/models/' + modeId + '/draft',
      method: 'post'
    })
  }

  // 模型下载

  export function downloadModel(modeId,format) {
    const queryParams = reactive({
      format:format,
    })
    return request({
      url: '/models/' + modeId + '/download',
      method: 'get',
      params: format
    })
  }